Skip to content

Remove networkx stubs in favor of typeshed - #369

Merged
Erik De Bonte (debonte) merged 6 commits into
microsoft:mainfrom
Avasam:remove-networkx
Jul 22, 2025
Merged

Remove networkx stubs in favor of typeshed#369
Erik De Bonte (debonte) merged 6 commits into
microsoft:mainfrom
Avasam:remove-networkx

Conversation

@Avasam

@Avasam Avasam (Avasam) commented May 15, 2025

Copy link
Copy Markdown
Contributor

networkx stubs have been added to typeshed in python/typeshed#10544 almost two years ago.

Many improvements since then.

In python/typeshed#14038 I'm currently merging what's left of these stubs that isn't present in typeshed to ensure no false-positive regressions to Pylance users. (and to not loose any work done here)

I already added all missing symbols in python/typeshed#14084
In python/typeshed#14256 I added all return type stubs

@Avasam
Avasam (Avasam) marked this pull request as draft May 15, 2025 03:41
@Akitsutori

Copy link
Copy Markdown

I believe this will resolve my issue here with deprecated signatures
typeshed has already updated to 3.5: https://github.com/python/typeshed/tree/main/stubs/networkx

grafik

But Pylance shows me an error with its built in stubs in 2025.5.1
grafik
Where the correct (new) signature is
grafik

@Avasam

Avasam (Avasam) commented Jun 20, 2025

Copy link
Copy Markdown
Contributor Author

I think once python/typeshed#14256 is merged, I'll feel comfortable enough removing networkx from microsoft/python-type-stubs.

There would still be lots of param types missing from typeshed (done in python/typeshed#14038), but these here stubs are full of incorrect or overly restrictive annotations anyway,

@debonte

Copy link
Copy Markdown
Contributor

Avasam (@Avasam), FYI, your recent typeshed changes are in Pylance prerelease 2025.6.102. We're planning to ship a stable release with these changes next week.

@Avasam
Avasam (Avasam) marked this pull request as ready for review July 11, 2025 18:37
@debonte

Copy link
Copy Markdown
Contributor

Avasam (@Avasam), is there anything else you want to do or wait for before I merge this?

@Avasam

Copy link
Copy Markdown
Contributor Author

Nope. Feel free to go ahead!

@debonte
Erik De Bonte (debonte) merged commit 692c37c into microsoft:main Jul 22, 2025
8 checks passed
@debonte

Copy link
Copy Markdown
Contributor

Thanks for your work on this Avasam (@Avasam)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants